From: Christoph Hellwig Date: Tue, 23 Nov 2010 13:38:02 +0000 (+0100) Subject: hfsplus: avoid useless work in hfsplus_sync_fs X-Git-Tag: archive/raspbian/4.9.13-1+rpi1~10^2~15819^2~10 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/%22bookmarks:/?a=commitdiff_plain;h=f02e26f8d90f8cde98314c72c2e890bc281a8346;p=linux-4.9.git hfsplus: avoid useless work in hfsplus_sync_fs There is no reason to write out the metadata inodes or volume headers during a non-blocking sync, as we are almost guaranteed to dirty them again during the inode writeouts. Signed-off-by: Christoph Hellwig --- diff --git a/fs/hfsplus/super.c b/fs/hfsplus/super.c index df6bea02b2b4..56e6cf80c5e0 100644 --- a/fs/hfsplus/super.c +++ b/fs/hfsplus/super.c @@ -160,6 +160,9 @@ int hfsplus_sync_fs(struct super_block *sb, int wait) int write_backup = 0; int error, error2; + if (!wait) + return 0; + dprint(DBG_SUPER, "hfsplus_write_super\n"); sb->s_dirt = 0;